package com.ruoyi.pos.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.pos.mapper.LevelMapper;
import com.ruoyi.pos.domain.Level;
import com.ruoyi.pos.service.ILevelService;

/**
 * levelService业务层处理
 * 
 * @author wzh
 * @date 2021-05-04
 */
@Service
public class LevelServiceImpl implements ILevelService 
{
    @Autowired
    private LevelMapper levelMapper;

    /**
     * 查询level
     * 
     * @param id levelID
     * @return level
     */
    @Override
    public Level selectLevelById(Long id)
    {
        return levelMapper.selectLevelById(id);
    }

    /**
     * 查询level列表
     * 
     * @param level level
     * @return level
     */
    @Override
    public List<Level> selectLevelList(Level level)
    {
        return levelMapper.selectLevelList(level);
    }

    /**
     * 新增level
     * 
     * @param level level
     * @return 结果
     */
    @Override
    public int insertLevel(Level level)
    {
        return levelMapper.insertLevel(level);
    }

    /**
     * 修改level
     * 
     * @param level level
     * @return 结果
     */
    @Override
    public int updateLevel(Level level)
    {
        return levelMapper.updateLevel(level);
    }

    /**
     * 批量删除level
     * 
     * @param ids 需要删除的levelID
     * @return 结果
     */
    @Override
    public int deleteLevelByIds(Long[] ids)
    {
        return levelMapper.deleteLevelByIds(ids);
    }

    /**
     * 删除level信息
     * 
     * @param id levelID
     * @return 结果
     */
    @Override
    public int deleteLevelById(Long id)
    {
        return levelMapper.deleteLevelById(id);
    }
}
